﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class zmm : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql;
        sql = "select mima from yonghuzhuce where yonghuming='" + yonghuming.Text.ToString().Trim() + "' and QQ='" + mmts.Text.ToString().Trim() + "' and jiguan='" + mmda.Text.ToString().Trim() + "'";
        getdata(sql);
    }
    private void getdata(string sql)
    {
        DataSet result = new DataSet();
        result = new Class1().hsggetdata(sql);
        if (result != null)
        {

            if (result.Tables[0].Rows.Count > 0)
            {
                Response.Write("<script>javascript:alert('您的密码是：" + result.Tables[0].Rows[0][0].ToString().Trim() + "，请牢记！');location.href='default.aspx';</script>");
            }
            else
            {

                Response.Write("<script>javascript:alert('您的输入有误，无法找回！');location.href='default.aspx';</script>");
            }
        }
    }
}
